package com.df.ez_game.server;

import com.df.ez_game.server.msg.client.ClientReqMsg;
import com.df.ez_game.server.msg.client.ClientRespMsg;

/**
 * 通过SPI的方式加载实现类
 */
public interface IEzGameMsgCodec {
    //网络消息编解码器
    byte[]  encodeNetMsg(ClientRespMsg resp);
    ClientReqMsg decodeNetMsg(byte[] reqBytes);

    //业务消息编解码器
    byte[]  encodeBusinessMsg(Object resp,Class clazz);
    Object decodeBusinessMsg(byte[] reqBytes,Class clazz);
}
